import request from '../../utils/request';
let baseRequest_url = "http://127.0.0.1:4890/portal";
//  --------------------------------------------------------------------------------------------------------------- //
// 新闻资讯列表分页查询
export const findNewsListPage = query => {
    return request({
        url: baseRequest_url+'/admin/news/findNewsListPage',
        method: 'get',
		params: query,
    });
};
// 新闻资讯列表查询
export const findNewsList = query => {
    return request({
        url: baseRequest_url+'/admin/news/findNewsList',
        method: 'get',
		params: query,
    });
};
// 新闻资讯详情查询
export const findNewsInfoById = query => {
    return request({
        url: baseRequest_url+'/admin/news/findNewsInfoById/'+query,
        method: 'get',
		params: query,
    });
};
// 新增新闻资讯
export const addNews = data => {
    return request({
        url: baseRequest_url+'/admin/news/saveNews',
        method: 'post',
		data: data,
    });
};
// 编辑新闻资讯
export const saveNews = data => {
    return request({
        url: baseRequest_url+'/admin/news/saveNews',
        method: 'put',
		data: data,
    });
};
// 删除新闻资讯
export const deleteNews = data => {
    return request({
        url: baseRequest_url+'/admin/news/deleteNews/'+data,
        method: 'delete',
    });
};
// 删除新闻资讯
export const batchDeleteNews = data => {
    return request({
        url: baseRequest_url+'/admin/news/deleteNews',
        method: 'delete',
        data: data
    });
};
// 新闻资讯状态批量更新
export const batchEditStatus = data => {
    return request({
        url: baseRequest_url+'/admin/news/batchEditStatus',
        method: 'put',
		data: data,
    });
};